<template>我是子组件： <input type="text" :value="modelValue" @input="onNameInput" /></template>

<script>
export default {
  name: 'Menu2Child1',
  props: {
    modelValue: {
      type: String,
      default: '',
    },
  },
  setup(props, context) {
    const onNameInput = (e) => {
      context.emit('update:modelValue', e.target.value)
    }
    return {
      onNameInput,
    }
  },
}
</script>

<style scoped></style>
